﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestMultiForm
{
    public partial class LoginForm : Form
    {
        public static Boolean LoginFlag;
        public LoginForm()
        {
            InitializeComponent();
        }


        private void LoginBtn_Click(object sender, EventArgs e)
        {
            string userName = userNameTextBox.Text;
            string password = passwordTextBox.Text;

            if(userName == "123" && password == "123")
            {
                LoginFlag = true;
                UserSession.UserName = userName;
                UserSession.Password = password;
            }
            else
            {
                LoginFlag = false;
            }
            this.Hide();
        } 
    }
}
